#########################################################################################
# root CMakeList of hiar2d system
#    Binglong Xie, May 2017
 #########################################################################################

cmake_minimum_required (VERSION 2.8.9)
project(barcode)

set ( SRC
    Recognizer.h
    Recognizer.cpp
    Gradient.h
    Gradient.cpp
    Sample.cpp
)


set(OpenCV_DIR "D:/pub/OpenCV/opencv-2.4.8/build/msvc120_win64")
find_package(OpenCV)

if(OpenCV_FOUND)
    message(STATUS "Package OpenCV found: Version ${OpenCV_VERSION}")
    message(STATUS "  OpenCV_INCLUDE_DIRS = ${OpenCV_INCLUDE_DIRS}")
    message(STATUS "  OpenCV_LIBS = ${OpenCV_LIBS}")
    message(STATUS "  OpenCV_SHARED = ${OpenCV_SHARED}")
    message(STATUS "  OpenCV_CONFIG_PATH = ${OpenCV_CONFIG_PATH}")

    add_definitions ( -DHS_HAS_OPENCV )
    include_directories ( ${OpenCV_INCLUDE_DIRS} )
else()
	message(Error ":OpenCV not found")
endif()
add_executable(barcode ${SRC})

target_link_libraries(barcode ${OpenCV_LIBS})

